<!doctype html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport"
        content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>购物车</title>
    <link rel="stylesheet" href="../css/reset.css">
    <link rel="stylesheet" href="../css/carts.css">
    <link rel="stylesheet" href="../css/bootstrap.css">
    <link rel="stylesheet" href="../css/reset.css">
    <link rel="stylesheet" href="../sass/index.css">
    <link rel="stylesheet" href="../css/index.css">
    <link rel="stylesheet" href="../jquery-ui-1.10.2/themes/base/jquery-ui.css">
    <link rel="stylesheet" href="../css/bootstrap.css">
    <link rel="stylesheet" href="../jquery-ui-1.10.2/themes/base/jquery-ui.css">
    <link rel="stylesheet" href="../iconfunt/iconfont.css">
    <link rel="stylesheet" href="../css/detailsmusic.css">
    <link rel="stylesheet" href="../css/styles.css">
    <script src="../jquery-ui-1.10.2/jquery-1.9.1.js"></script>
    <script src="../jquery-ui-1.10.2/ui/jquery-ui.js"></script>
    <style>
        .logout {
            display: none;
        }
    </style>
</head>

<body>
    <nav>
        <div class="banxin">
            <main class="s-sub">
                <ul>
                    <li><a href="http://172.168.20.103/HUAWEI/ALL/index.html">首页</a></li>
                    <li><a href="#">华为官网</a></li>
                    <li><a href="">花粉俱乐部</a></li>
                    <li><a href="">V码(优购码)</a></li>
                    <li><a href="#">企业购</a></li>
                    <li><a href="#">Select Regjon</a></li>
                    <li class="gdjc"><a href="#">更多精彩</a></li>   
                </ul>
            </main>
            <main class="s-main">
                <li><a href="logon.html">请登录</a></li>
                <li class="logout"><a
                        href="javascript:document.cookie='phone=;expires=Thu, 01 Jan 1970 00:00:00 UTC;';location='index.html'">退出登录</a>
                </li>
                <li><a href="parking.html">注册</a></li>
                <li><a href="">我的订单</a></li>
                <li class="s-main-lis"><a href="#">客户服务
                        <ul>
                            <li>服务中心</li>
                            <li>联系客服</li>
                        </ul>
                    </a></li>
                <li class="s-main-lis2"><a href="">网站导航
                        <!-- <div class="div1">
                    <article>
                        
                    </article>
                    <article></article>
                    <article></article>
                    <article></article>
                    <article></article>
                </div> -->
                    </a></li>
                <li><a href="">手机导航</a></li>
                <li><a href="#">购物车<span></span></a></li>

            </main>
        </div>
    </nav>
    <section class="cartMain">
        <div class="cartMain_hd">
            <ul class="order_lists cartTop">
                <!-- <li class="list_chk"> -->
                <!--所有商品全选-->
                <!-- <input type="checkbox" id="all" class="whole_check">
                    <label for="all"></label> 
                </li> -->
                <li class="list_con">商品信息</li>
                <li class="list_info">商品参数</li>
                <li class="list_price">单价</li>
                <li class="list_amount">数量</li>
                <li class="list_sum">金额</li>
                <li class="list_op">操作</li>
            </ul>
        </div>

        <div class="cartBox">
            <div class="shop_info">
                <div class="all_check">
                    <!--店铺全选-->
                    <input type="checkbox" id="shop_a" class="shopChoice">
                    <label for="shop_a" class="shop"></label>
                </div>
                <div class="shop_name">
                    全选商品：<a href="javascript:;"></a>
                </div>
            </div>
            <div class="order_content">

            </div>
        </div>


        <!--底部-->
        <div class="bar-wrapper">
            <div class="bar-right">
                <div class="piece">已选商品<strong class="piece_num">0</strong>件</div>
                <div class="totalMoney">共计: <strong class="total_text">0.00</strong></div>
                <div class="calBtn"><a href="javascript:location='http://172.168.20.103/HUAWEI/ALL/jiesuan.html';">结算</a></div>
            </div>
        </div>
    </section>
    <section class="model_bg"></section>
    <section class="my_model">
        <p class="title">删除宝贝<span class="closeModel">X</span></p>
        <p>您确认要删除该宝贝吗？</p>
        <div class="opBtn"><a href="javascript:;" class="dialog-sure">确定</a><a href="javascript:;"
                class="dialog-close">关闭</a></div>
    </section>
    <script src="../js/jquery-1.11.3.min.js"></script>
    
    <script>
       
        if (document.cookie.split("=").length == 2) {
            var str = document.cookie.split("=")[1];
            str = str.replace(/^(\d{3})(\d{6})(\d{2})$/, (a, b, c, d) => {
                return b + "******" + d
            })
            $("[href='logon.html']").html(str);
            $("[href='logon.html']").attr("href", "#");
            $(".logout").css("display", "inline");
            $("[href='parking.html']").css("display", "none");
        }else if(document.cookie==""){
            alert('请登录后查看');
            location='http://172.168.20.103/HUAWEI/ALL/logon.html';    
        }
    </script>
      <script src="../js/cartown.js"></script>
    <script>  
        var people = document.cookie.split("=")[1];
        var c = 0;
        $.ajax({
            url: "http://172.168.20.103/HUAWEI/ALL/allphp.php",
            data: "hide=cartplease&people=" + people,
            dataType: "JSONP",
            success: data => {
                data.forEach((val) => {
                    if (val.peoplenum == people) {
                        c++;  
                    }
                })
                $(".CART").html(`(${c})`);
            }
        })

    </script>
  

</body>

</html>